//
//  SISSSpecialOffersView.m
//  SISSAPP
//
//  Created by 袁应荣 on 2018/10/18.
//  Copyright © 2018年 优房网. All rights reserved.
//

#import "SISSSpecialOffersView.h"

@interface SISSSpecialOffersView ()

/// 优惠信息
@property (weak, nonatomic) UILabel *specialOffersTitleLabel;
@property (weak, nonatomic) UILabel *specialOffersLabel;

@end
@implementation SISSSpecialOffersView

- (void)setSpecialOffers:(NSString *)specialOffers {
    _specialOffers = specialOffers;
    self.specialOffersLabel.text = specialOffers;
}

- (void)initUI {
    [super initUI];
    
    UILabel *specialOffersTitleLabel = [UILabel yyr_labelWithText:@"优惠信息" fontSize:15 textColor:UIColor.blackColor];
    [self addSubview:specialOffersTitleLabel];
    self.specialOffersTitleLabel = specialOffersTitleLabel;
    
    UILabel *specialOffersLabel = [UILabel yyr_labelWithText:@"--" fontSize:11 textColor:COLOR(0xE59335)];
    [self addSubview:specialOffersLabel];
    self.specialOffersLabel = specialOffersLabel;
}

- (void)initConstraint {
    [super initConstraint];
    
    WeakSelf
    [self.specialOffersTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.equalTo(weakSelf).offset(2 * globelMargin);
    }];
    
    [self.specialOffersLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(weakSelf.specialOffersTitleLabel.mas_bottom).offset(2 * globelMargin);
        make.left.equalTo(weakSelf.specialOffersTitleLabel);
        make.right.equalTo(weakSelf).offset(-2 * globelMargin);
        make.bottom.equalTo(weakSelf).offset(-2 * globelMargin);
    }];
}

@end
